<?php

session_start();
include_once '../connectBDD.php';
$query = "SELECT * FROM event e, event_user eu where e.id_event = eu.id_event and eu.login_user ='" . $_SESSION['login'] . "'";
$result = mysql_query($query) or die(mysql_error());
if (mysql_num_rows($result) <= 0) {
    echo "<div class='no_result_found'>Aucun évenement</div>";
} else {
    while ($row = mysql_fetch_assoc($result)) {
        echo"
             <div id='evenement'>
                <div id='petite_image'>
                    <img src=" . $row['flyer_path'] . " width='50px' height='50px' />
                </div>
                <div id='login'><a href='detailEvenement.php?idEvent=" . $row['id_event'] . "'>" . $row['name_event'] . "</a></div>
             </div>";
    }
}
?>
